package cn.supermaster.management.web.controller.monitor;

import cn.supermaster.management.web.service.monitor.IMonitorServerService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import cn.supermaster.management.common.controller.BaseController;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 服务器监控
 */
@Controller
@RequestMapping("/monitor/server")
public class MonitorServerController extends BaseController {

    @Autowired
    private IMonitorServerService monitorServerService;

    @RequiresPermissions("monitor:server:view")
    @GetMapping
    public String server(ModelMap modelMap) {
        return monitorServerService.getServerInformation(modelMap);
    }
}
